1. Field of the Invention
The present invention relates to a digital pitch shifter for shifting the pitch of an input signal according to a digital signal processing technique and, more particularly, to a digital pitch shifter which can prevent generation of a discontinuous point of a signal waveform.
2. Description of the Related Art
Conventionally, a strong demand has arisen for realization of a pitch shifter for performing, in real time, pitch shift processing for obtaining an effect that a voice produced at a microphone of, e.g., karaoke equipment is converted into a sound having another pitch, and the sound is reproduced from a loudspeaker.
As a prior art apparatus that realizes the above-mentioned pitch shift processing, a pitch shifter utilizing digital signal processing is known. In such a digital pitch shifter, input waveform data (sound signal) is sequentially written at addresses continuous from a predetermined start address of a memory on the basis of write addresses, which are incremented by an increment width "1" at every sampling timing. In this case, when the write address reaches a predetermined address, it returns to the start address to continue a write access. Simultaneously with this operation, the waveform data written in the memory is read out and output on the basis of read addresses, which are sequentially incremented by an increment width (address width) corresponding to a pitch shift amount. For example, if the pitch frequency is to be doubled, the increment width is set to be "2". In contrast to this, when the pitch frequency is to be halved, the increment width is set to be "0.5". In this case, since the addresses of the memory are integers, waveform data read out from two adjacent integer addresses is interpolated to generate waveform data corresponding to addresses incremented by the increment width of the real number.
In addition to the above-mentioned prior art, a digital pitch shifter, which changes the ratio itself of a clock speed set when input waveform data is A/D-converted, and is written in a memory to a clock speed set when waveform data is read out from the memory, and is D/A-converted, according to the pitch shift amount, is also known.
In the digital pitch shifter having the above-mentioned basic arrangement, since the advance speed of a write address is different from that of a read address of the memory, the read address may overtake the write address, and vice versa. When such a phenomenon occurs, readout waveform data becomes discontinuous over time, and click noise is mixed in an output sound, thus considerably deteriorating sound quality.
As the first prior art for technique preventing this phenomenon, a technique for causing, near the above-mentioned discontinous point, a read address to jump to a zero-crossing point of data (a point where the amplitude of waveform data becomes zero) so as to connect waveform data at the zero-crossing point, is known (Published Unexamined Japanese Patent Application No. 60-35795).
As the second prior art technique, the following technique is proposed (Published Unexamined Japanese Patent Application No. 60-159799). In this prior art technique, waveform data is written in the same manner as in the above-mentioned basic arrangement. In contrast to this, waveform data is simultaneously read out from two read addresses, which are designated to be separated by a predetermined address interval of the memory. Normally, waveform data read out from the first read address is output. When the difference between the first read address and the write address falls within a range of difference corresponding to a predetermined time interval, two items of waveform data read out from the first and second read addresses are cross-faded according to a predetermined function, thereby generating output waveform data. In this case, cross-fade processing is performed, so that the mixing ratio of waveform data read out from the first read address is gradually decreased, and the mixing ratio of waveform data read out from the second read address is gradually increased. Immediately before the first read address coincides with the write address, the second read address is replaced with the first read address, and thereafter, waveform data read out from the replaced new read address is output. Upon repetition of the above operations, pitch shift processing is so executed as to decrease the ratio of waveform data components near the above-mentioned discontinuous point in output waveform data as much as possible. Thus, generation of click noise can be minimized.
However, in an actual application of the first prior art technique, noise cannot be removed perfectly.
On the other hand, the second prior art technique can considerably suppress the click noise. In the second prior art technique, the cross-fade processing is started when the difference between the first read address and the write address falls within the range of difference corresponding to the predetermined time interval. In order to obtain a natural output sound, when the pitch shift amount is changed, the value of the address difference corresponding to the predetermined time interval must also be changed. For this reason, the second prior art technique requires means for changing a setting value of the address difference according to the pitch shift amount, and means for determining whether or not the difference between the first read address and the write address coincides with the above-mentioned setting value. For this reason, control is complicated, and the circuit size is increased.